package sht.commons;

import org.apache.log4j.Logger;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;

@Aspect
public class AOPUtil{
	
	private static final Logger log = Logger.getLogger(AOPUtil.class.getName());
	
	@Pointcut("execution(* sht.controller.*.*(..))")
	public  void  transactionPointCut(){
		log.info("AOPUtil transactionPointCut is running...");
	}
	
	@Before("transactionPointCut()")
	public void before() {
		log.info("AOPUtil before is running...");
	}
	
	@After("transactionPointCut()")
	public void after() {
		log.info("AOPUtil after is running...");
	}
	
	
	/*@Pointcut("execution(* sht.controller.*.*(..))")
	public  void  transactionPointCut(){

	}
	
	@Before("execution(* sht.controller.*.*(..))")
	public void before() {
		System.out.println("before is running...");
	}
	
	@After("execution(* sht.controller.*.*(..))")
	public void after() {
		System.out.println("after is running...");
	}*/
	
	
}
